﻿#region "Copyright (C) Lenny Granovsky. 2005-2013"
//This program is free software distribute under the terms of the GNU General Public License as published by
//the Free Software Foundation. Please read AssemblyInfo.cs file for more information.
#endregion

using System;
using System.Collections.ObjectModel;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;

namespace Web.Enhancements.Rest.WebControls
{
    /// <summary>
    /// Represents the error handling information.
    /// </summary>
    [DefaultProperty("ErrorMessageStartsWith")]
    public class ErrorHandling
    {
        /// <summary>
        /// Gets or sets the string that error message should begin with. 
        /// The REST error handling process watches for specific string that response should start with. 
        /// If value not set, no error handling is provided.
        /// </summary>
        public string ErrorMessageStartsWith { get; set; }
        /// <summary>
        /// Gets or sets custom defined client-based javascript function that should be used for error handling. 
        /// If function is not defined internal error handling notification is used.
        /// </summary>
        public string ClientDelegateName { get; set; }
        /// <summary>
        /// Default constructor.
        /// </summary>
        public ErrorHandling()
        {
            this.ErrorMessageStartsWith = "";
            this.ClientDelegateName = "";
        }
    }
}
